1. Field of the Invention
The present invention generally relates to data processing, and more specifically, to a method and apparatus of processing data by using simultaneous multithreading.
2. Description of Related Art
A traditional CPU can only process an instruction sequence at a certain time, commonly called as a thread. In thread process, it is necessary for the processing unit of a CPU to continuously fetch instructions and data for processing. With the development of CPU technology, frequency and performance are increasingly improved for CPU, leading to the requirement for faster and faster instructions and data fetch. Unfortunately, the development of memory technology can not catch up with the evolution of CPU. As a result, memory commonly suffers from being unable to support a CPU with sufficient instructions and data for processing. Thus, the Simultaneous Multithreading (SMT) technique emerged. SMT is a hardware multi-thread technique that enables instructions from multiple threads to run within the same CPU clock cycle. In nature, SMT is a method for converting thread-level parallel processing (on multiple CPUs) to instruction-level parallel processing (on a single CPU). Simultaneous multithreading is an ability of dispatching instructions from multiple hardware thread contexts by a single physical processor. SMT enables a CPU to schedule several applications simultaneously, so that the features of the superscalar structure can be employed. SMT can bring performance optimization for processing business transaction workloads. When the overall system throughput is concerned rather than the throughput of individual threads, SMT is an excellent option. However, not all applications can realize performance optimization with SMT. For those applications having performance restrictions on execution units or those ones that exhaust the whole memory bandwidth of CPU, their performances cannot be improved through running two threads on the same processor. Currently, SMT has been enabled on some high-end processors.